<template>
  <div class="header-wrapper">
    <header>
      <a class="image-wrapper" href="">
        <img src="../assets/logocat.jpg" alt="" />
      </a>
      <div class="menu-wrapper">
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
          <el-submenu index="1">
            <template slot="title">开源项目</template>
            <el-menu-item index="1-1">NaNa-ui库</el-menu-item>
            <el-menu-item index="1-2">会动的pikachu</el-menu-item>
            <el-menu-item index="1-3">记账本</el-menu-item>
          </el-submenu>
          <el-menu-item index="2">
            <router-link to="/blog" active-class="selected">技术博客</router-link>
          </el-menu-item>
          <el-menu-item index="3">
            <router-link to="/life" active-class="selected">生活</router-link>
          </el-menu-item>
          <el-menu-item index="4">
            <router-link to="/photography" active-class="selected">摄影</router-link>
          </el-menu-item>
          <el-menu-item index="5">
            <router-link to="/login" active-class="selected">登录</router-link>
          </el-menu-item>
        </el-menu>        
      </div>
    </header>
  </div>
</template>

<script>
export default {
  name: "Header2",
  components: {},
  data() {
    return {
      activeIndex: '1',
    }
  },
  methods:{

  }
};
</script>

<style scoped lang="scss">
.header-wrapper {
  border: none;
  background-color: #fff;

  /* border: 1px solid gray; */
  header {
    min-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 100px;
    .image-wrapper {
      width: 44px;
      height: 44px;
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }
    .menu-wrapper {
      ::v-deep 
      .el-menu--horizontal {
        border: none;
      }
      a {
        padding: 20px;
      }
    }
  }
}
</style>
